package com.ruoyi.insurance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.insurance.mapper.DefendMapper;
import com.ruoyi.insurance.domain.Defend;
import com.ruoyi.insurance.service.IDefendService;

/**
 * 防护Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-10
 */
@Service
public class DefendServiceImpl implements IDefendService 
{
    @Autowired
    private DefendMapper defendMapper;

    /**
     * 查询防护
     * 
     * @param defendId 防护主键
     * @return 防护
     */
    @Override
    public Defend selectDefendByDefendId(Long defendId)
    {
        return defendMapper.selectDefendByDefendId(defendId);
    }

    /**
     * 查询防护列表
     * 
     * @param defend 防护
     * @return 防护
     */
    @Override
    public List<Defend> selectDefendList(Defend defend)
    {
        return defendMapper.selectDefendList(defend);
    }

    /**
     * 新增防护
     * 
     * @param defend 防护
     * @return 结果
     */
    @Override
    public int insertDefend(Defend defend)
    {
        return defendMapper.insertDefend(defend);
    }

    /**
     * 修改防护
     * 
     * @param defend 防护
     * @return 结果
     */
    @Override
    public int updateDefend(Defend defend)
    {
        return defendMapper.updateDefend(defend);
    }

    /**
     * 批量删除防护
     * 
     * @param defendIds 需要删除的防护主键
     * @return 结果
     */
    @Override
    public int deleteDefendByDefendIds(Long[] defendIds)
    {
        return defendMapper.deleteDefendByDefendIds(defendIds);
    }

    /**
     * 删除防护信息
     * 
     * @param defendId 防护主键
     * @return 结果
     */
    @Override
    public int deleteDefendByDefendId(Long defendId)
    {
        return defendMapper.deleteDefendByDefendId(defendId);
    }
}
